import request from '@/config/axios'

// 师昌绪终评-答辩时间安排 VO
export interface ScxFinalDebateTimeVO {
  id: string // 终评答辩时间ID
  finalSettingId: string // 终评设置ID
  breakTime: string // 休息时间json
  gap: number // 答辩间隔分钟
  debateStartTime: Date // 答辩开始时间
  priority: string // 博士或硕士优先
  remark: string // 备注
}

// 师昌绪终评-答辩时间安排 API
export const ScxFinalDebateTimeApi = {
  // 查询师昌绪终评-答辩时间安排分页
  getScxFinalDebateTimePage: async (params: any) => {
    return await request.get({ url: `/awards/scx-final-debate-time/page`, params })
  },

  // 查询师昌绪终评-答辩时间安排详情
  getScxFinalDebateTime: async (id: string) => {
    return await request.get({ url: `/awards/scx-final-debate-time/get?id=` + id })
  },

  // 新增师昌绪终评-答辩时间安排
  createScxFinalDebateTime: async (data: ScxFinalDebateTimeVO) => {
    return await request.post({ url: `/awards/scx-final-debate-time/create`, data })
  },

  // 修改师昌绪终评-答辩时间安排
  updateScxFinalDebateTime: async (data: ScxFinalDebateTimeVO) => {
    return await request.put({ url: `/awards/scx-final-debate-time/update`, data })
  },

  // 删除师昌绪终评-答辩时间安排
  deleteScxFinalDebateTime: async (id: string) => {
    return await request.delete({ url: `/awards/scx-final-debate-time/delete?id=` + id })
  },

  // 导出师昌绪终评-答辩时间安排 Excel
  exportScxFinalDebateTime: async (params) => {
    return await request.download({ url: `/awards/scx-final-debate-time/export-excel`, params })
  },

  // 根据终评设置获得师昌绪终评-答辩时间安排
  getScxFinalDebateTimeBySettingsId: async (settingsId: string) => {
    return await request.get({
      url: `/awards/scx-final-debate-time/get-by-settings?settingsId=${settingsId}`
    })
  }
}
